package com.hong.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.springframework.stereotype.Service;
/**
 *
 * 功能描述: zk监听
 *
 * @param:
 * @return:
 * @auther: csh
 * @date: 2020/12/14 14:21
 */
@Service
@Slf4j
public class WaterServiceImpl implements Watcher {
 
    @Override
    public void process(WatchedEvent event) {
        log.info("【Watcher监听事件】={}",event.getState());
        log.info("【监听路径为】={}",event.getPath());
        log.info("【监听的类型为】={}",event.getType()); //  三种监听类型： 创建，删除，更新
    }
}